package com.java.oop;

public class ArraysTest {
    public static void main(String[] args) {
        int[] array = {43, 63, 25, 88, 31};
        // 排序
        Arrays.sort(array);
        for (int n : array) {
            System.out.println(n);
        }
        System.out.println("-----------");
        // 二分查找
        int pos = Arrays.binarySearch(array, 31);
        // 打印排序后的数组
        System.out.println("Pos是"+pos);
        System.out.println("-----------");

        // 判断两个数组是否相同
        boolean b = Arrays.equals(array, new int[]{25, 31, 43, 63, 88});
        System.out.println("b=" + b);
    }
}
